package cn.baker.app.consmer;

import cn.baker.rabbitmq.listener.AbstractMessageListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.stereotype.Component;

/**
 * @author yuanyu
 */
@Slf4j
@Component
public class MyConsumer extends AbstractMessageListener {
    @Override
    public void receiveMessage(Message message) {
        String payload = new String(message.getBody());
        log.info("receiveMessage message={}", new String(message.getBody()));
        int i = 10 / Integer.parseInt(payload);
    }
}
